<!DOCTYPE html  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- [IC型号/元器件]搜索专享 -->
    <meta name="keywords" content="一号轴承网">
    <meta name="description"
          content="一号轴承网">
    <title>一号轴承网</title>
    <link rel="shortcut icon" href="/img/logo.ico" type="image/x-icon">
    <link href="/abd/common.css" rel="stylesheet" type="text/css">
    <link href="css/bootstrap.min.css?v=3.3.6"
          th:href="@{/css/bootstrap.min.css?v=3.3.6}" rel="stylesheet">
    <link href="/css/font-awesome.css?v=4.4.0"
          th:href="@{/css/font-awesome.css?v=4.4.0}" rel="stylesheet">
    <link href="/css/plugins/bootstrap-table/bootstrap-table.min.css"
          th:href="@{/css/plugins/bootstrap-table/bootstrap-table.min.css}"
          rel="stylesheet">
    <link href="/css/front/style.css" rel="stylesheet" type="text/css">
    <script src="/js/jquery.min.js?v=2.1.4"></script>
    <script src="/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="/js/plugins/validate/messages_zh.min.js"></script>
    <script src="/js/plugins/jsTree/jstree.min.js"></script>
    <script src="/js/plugins/jqTreeGrid/jquery.treegrid.min.js"></script>
    <script src="/js/plugins/jqTreeGrid/jquery.treegrid.extension.js"></script>
    <script src="/js/plugins/jqTreeGrid/jquery.treegrid.bootstrap3.js"></script>
    <script src="/js/plugins/chosen/chosen.jquery.js"></script>
    <script src="/js/plugins/layer/layer.js"></script>
    <!--[if IE 7]>
    <link href="http://www.ic.net.cn/media/css/ui/ie7fix.css" rel="stylesheet" type="text/css"/> <![endif]-->
    <script type="application/javascript">
        var li_ok = '<img src=http://oss.114ic.com/Img/check_right.gif border=0> ';  //用于显示正确时的图标
        var li_err = '<img src=http://oss.114ic.com/Img/check_error.gif border=0> '; //用于显示错误时的图标
        function isEmail() {
            var email = document.getElementById('email').value;
            if (email.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) {
                document.getElementById('email_re').innerHTML = li_ok;
                document.getElementById('email_re_m').innerHTML = '<span class=msg2>填写正确</span>';
                return true;
            }
            else {
                document.getElementById('email_re').innerHTML = li_err;
                document.getElementById('email_re_m').innerHTML = '<span class=msg>请填写正确的邮箱地址，格式为：123456@qq.com</span>';
                return false;
            }
        }

        function chk_email() {
            if (isEmail() == false) {
                return false;
            }
            $.ajax({
                url:"/front/sentEmail",
                type:"post",
                data:$('#regform').serialize(),
                dataType:"json",
                success:function (data) {
                    console.log(data);
                    if (data.code == 0) {
                        layer.msg("密码重置邮件已发送成功，请查收!");
                    }
                    else {
                        layer.msg(data.msg);
                        return false;
                    }
                },
                error:function (data) {
                    console.log(data);
                }

            })
        }
    </script>
</head>
<body>
<div class="top">
    <div class="top_m b-r-s">
        <div class="top_l">
            <span>欢迎来到“<a href="/front/index">一号轴承网”</a></span>
            <span th:if="${!isLogin}">
                <a  style="font-size: 15px;color: #ff7300;font-weight:bold;" rel="nofollow" href="/login">登录</a>
                <a  style="font-size: 15px;color: #ff7300;font-weight:bold;" rel="nofollow" href="/front/register">免费注册</a>
            </span>
            <span th:if="${isLogin}">
                <a  style="font-size: 15px;color: #ff7300;font-weight:bold;" rel="nofollow" href="/member/welcome">会员中心</a>
            </span>
        </div>
    </div>
    <span style="float: right;padding-right: 30px;" th:if="${isLogin}">
        <a style="font-size: 15px;color: #ff7300;font-weight:bold;" rel="nofollow" href="/logout">退出</a>
    </span>
</div>
<div th:replace="include::header1">
</div>
<div class="content" style="margin-top: 20px">
    <div class="main w m-b-10">
        <div class="position"><a class="home" href="/front/index">首页</a></div>

    <!--主内容区begin-->
        <div>
            <form method="post" id="regform" action="/sent/resetpassword">
                <table  class="table  table-striped table-hover">
                    <tbody>
                    <tr>
                        <td align="right" style="width:10%;line-height: 30px">电子邮箱：</td>
                        <td style="width:30%;line-height: 30px">
                            <div class="columns col-md-12 nopadding">
                                <input class="form-control" name="email" id="email" type="text" maxlength="80" onblur="isEmail()" size="30">
                            </div>
                        </td>
                        <td style="width:1%;line-height: 30px"><span class="STYLE1" id="email_re">*</span></td>
                        <td id="email_re_m" style="width:29%;line-height: 30px"></td>
                    </tr>
                    <tr>
                        <td align="right"> 　</td>
                        <td align="left" colspan="3"><input type="button" class="btn btn-success" onclick="chk_email()"
                                                            value="点击发送"></td>
                    </tr>
                    </tbody>
                </table>
            </form>
        </div>

    </div>

    <div th:replace="include::foot1">
    </div>
    <div th:replace="include::foot2">
    </div>
</div>
</body>
</html>